<template>
	<view class="build-wrap">
		<view class="build-head u-p-l-30 u-p-r-30 u-p-t-20 u-p-b-20 u-font-36">
			{{buildName}}
		</view>
		<view @click="toBuild3(item)" v-for="(item,index) in buildList" :key="index" class="build-list u-p-l-30 u-p-r-30 u-p-t-20 u-p-b-20 u-font-32">
			{{buildName}}/{{item.buildTowerCode}}
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				buildName:null,
				buildList:[],
			}
		},
		onShow(){
			this.getBuild()
			this.buildName=this.$Route.query.name+'/'+this.$Route.query.dis_code
		},
		methods:{
			// 获取期
			async getBuild(){
				let res = await this.$request.api.build({
					pro_id:this.$Route.query.id,
					dis_code:this.$Route.query.dis_code
				})
				this.buildList=res.data.data
			},
			toBuild3(val){
				this.$Router.push({
					path: '/pages/building3/building3',
					query: {
						name:this.buildName+'/'+val.buildTowerCode,
						id:this.$Route.query.id,
						buildId:val.buildId,
					}
				})
			}
		}
	}
</script>

<style lang='scss'>
	.build-wrap{
		width: 100vw;
		height: 100vh;
		.build-head{
			border-bottom: 10px solid #f4f4f4;
			color: #333;
		}
		.build-list{
			border-bottom: 1px solid #f4f4f4;
			color: #333;
		}
	}
</style>
